javascript tricky interview question